import 'package:dio/dio.dart';

class AdAPI {
  final Dio? _dio;
  AdAPI(this._dio);

  // 广告列表
  Future<dynamic> adList({ String spaceKeys = '999' }) async{
    // Response? res = await _dio?.get('https://www.dmoe.cc/random.php?return=json',
    Response? res = await _dio?.get('/data.json',
      queryParameters: {
        'spaceKeys': spaceKeys
      }
    );
    return res?.data['content'][0]['adDTOList'];
    
  }
}